// index.ts
// 获取应用实例
const app = getApp<IAppOption>()
Page({
  data: {
    version: '0.0.1',
    loading: true,
  },
  lifetimes: {
    created(){
      wx.showLoading({
        title: '加载中',
      })
    },
    ready() {
      this.hideLoading();
    }
  },
  hideLoading(){
    wx.hideLoading()
    this.setData({
      loading: false
    })
  },
  onShareAppMessage(){
    return {
      title: "万事屋",
      imageUrl: "https://cdn.hanxiaoxin.cn/miniprogram/icon/program/yinshi.jpg",
      path: "/pages/index/index"
    }
  },
  onHomeClick(){
    wx.showToast({
      title: '今天天气不错啊Zz',
      icon: 'none',
      duration: 2000,
      mask: false,
    });
  },
  onRoleClick(){
    wx.showToast({
      title: '现在很晚了呢~',
      icon: 'none',
      duration: 2000,
      mask: false,
    });
  },
  onChatClick(){
    wx.showToast({
      title: '有什么事明天再说吧Oo',
      icon: 'none',
      duration: 2000,
      mask: false,
    });
  },
  onConfigClick(){
    wx.showToast({
      title: '敬请期待!',
      icon: 'none',
      duration: 2000,
      mask: false,
    });
  }
})
